package ie.timalb.chess.main.core.movement.types;

import ie.timalb.chess.main.core.Board;
import ie.timalb.chess.main.core.Turn;
import ie.timalb.chess.main.core.exceptions.ImpossibleToTraceARouteException;
import ie.timalb.chess.main.core.movement.Movement;

public class OneSquareDiagonalToKill extends TypeOfMovement {

	@Override
	public boolean isThisMovement(Turn turn, Movement mov, Board board) {
		try {
			if (mov.areInTheSameDiagonal() && mov.getRouteStepsBasedOnColor() == 1)
			{
				return true;
			}
			else
			{
				return false;	
			}
		} catch (ImpossibleToTraceARouteException e) {
			return false;
		}		
	}

}
